<template>
  <div>
    邮箱：<input type="text"  v-model="phone"><br>
    密码： <input type="password"  v-model="password"><br>
    <button @click="login">登录</button>
  </div>
</template>

<script>


  export default {

    data() {
      return {
        phone: 'wxk2378643373@163.com',
        password:'wxk@20020626',
        nickname:''
      };
    },
    methods:{
      login(){
        this.getAxios("/login?email="+this.phone+"&password="+this.password).then((data)=>  {
            // console.log(data);
            if(data.code == '200'){
              // console.log(data.profile.nickname);
                location.nickname = data.profile.nickname
               this.$router.push({name:'Home',})
            }else{
              alert("账号密码错误");
            }


        })
      }
    }
  }
</script>

<style  scoped>

</style>
